﻿
package bsplib;
import haxe.Log;

class Debug 
{
    public inline static function assert( cond : Bool, ?pos : haxe.PosInfos ) {
        #if debug
        if( !cond ) {
            Log.trace( "assertion failed", pos );
            throw pos.fileName + ":" + pos.lineNumber + " assertion fail";
        }
        #end
    }
    
    public inline static function trace( s : String, ?pos : haxe.PosInfos ) {
        #if debug
            Log.trace( s, pos );
        #end
    }
}